﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace Game
{
    public class CharacterManager : EntityManager
    {
        public override void InitPrototypes(ContentManager contentManager)
        {
            _nprototype = 2;
            _prototype = new Character[_nprototype];

            _prototype[0] = new Character();
            int nframe = 10;
            int dframe = 15;
            _prototype[0].Init(contentManager, 1, "luffygear00", nframe, dframe);

            _prototype[1] = new Character();
            nframe = 5;
            dframe = 5;
            _prototype[1].Init(contentManager, 1, "Boss1", nframe, dframe);
            //_prototype[1] = new Character();
            //_prototype[1].Init(contentManager, 15, "Knight");
        }

        public override VisibleGameEntity CreateObject(int idx)
        {
            if ((idx < 0) || (idx >= _nprototype))
                return null;
            return _prototype[idx].Clone();
        }
    }
}
